package com.cyt.work.antiepidemic.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * e门通-社区住户信息实体类
 *
 * @author rong yuan
 * @date 2020-2-12 2:07:52
 */
@Data
@NoArgsConstructor
@Table(name = "cyt_antiepidemic_person")
public class AntiepidemicPerson implements Serializable {

    /**
     * 主键ID
     */
    @Id
    private String id;

    /**
     * 应用ID
     */
    @Column(name = "apply_id")
    private String applyId;

    /**
     * 会员ID
     */
    @Column(name = "member_id")
    private String memberId;

    /**
     * 姓名
     */
    @Column(name = "name")
    private String name;

    /**
     * 性别：0-保密；1-男；2-女
     */
    @Column(name = "sex_type")
    private String sexType;

    /**
     * 手机号
     */
    @Column(name = "mobile")
    private String mobile;

    /**
     * 身份证号
     */
    @Column(name = "id_card")
    private String idCard;

    /**
     * 房屋ID
     */
    @Column(name = "building_id")
    private String buildingId;

    /**
     * 室号
     */
    @Column(name = "building_room")
    private String buildingRoom;

    /**
     * 是否外地返芜：0-否；1-是
     */
    @Column(name = "return_status")
    private String returnStatus;

    /**
     * 返程时间
     */
    @Column(name = "return_time")
    private Date returnTime;

    /**
     * 返程地区
     */
    @Column(name = "return_area")
    private String returnArea;

    /**
     * 是否经过疫区：0-否；1-是
     */
    @Column(name = "epidemic_area")
    private String epidemicArea;

    /**
     * 复工证明
     */
    @Column(name = "certificate_object_id")
    private String certificateObjectId;

    /**
     * 复工申请状态：0-否；1-是
     */
    @Column(name = "certificate_status")
    private String certificateStatus;

    /**
     * 复工下班时间
     */
    @Column(name = "certificate_time")
    private String certificateTime;

    /**
     * 审核状态：0-审核中；1-通过；2-不通过
     */
    @Column(name = "verify_status")
    private String verifyStatus;

    /**
     * 车牌号
     */
    @Column(name = "car_number")
    private String carNumber;

    /**
     * 删除标志：0-未删除；1-已删除
     */
    @Column(name = "remove_tag")
    private String removeTag;

    /**
     * 创建人ID
     */
    @Column(name = "create_user")
    private String createUser;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新人ID
     */
    @Column(name = "update_user")
    private String updateUser;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    @Transient
    private String buildingInfo;

    /**
     * 创建对象
     *
     * @param sysUser 当前用户信息
     * @author rong yuan
     * @date 2020-2-12 2:07:52
     */
    public AntiepidemicPerson(SysUser sysUser) {
        this.id = BaseUtil.uId();
        this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
        this.createTime = new Date();
        this.updateTime = new Date();
        if (sysUser != null) {
            this.createUser = sysUser.getId();
            this.updateUser = sysUser.getId();
        }
    }
}